package com.qike.baoxiu.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Eric.zhou
 * @Date: 2019/6/11 14:53
 */
public enum ScaleEnums {
    TEN_TO_FIFTY                 ("10-50"),
    FIFTY_TO_HUNDRED                  ("50-100"),
    LARGE_THAN_HUNDRED                  ("100以上"),
    ;
    private String ecode;


    ScaleEnums(String ecode) {
        this.ecode = ecode;
    }

    public String getEcode() {
        return ecode;
    }


    public static ScaleEnums statOf(String ecode) {
        for (ScaleEnums state : values())
            if (state.getEcode().equals(ecode))
                return state;
        return null;
    }

    public static List<String> enumslist() {
        List<String> list = new ArrayList<>();
        for (ScaleEnums state : values()){
            list.add(state.getEcode());
        }
        return list;
    }

}
